<?php


namespace app\admin\controller;


use app\common\controller\AdminBaseController;
use think\facade\Db;
use think\facade\View;

class Login extends AdminBaseController
{
    public function index(){


        $info = Db::name('admin_users')->where(['id'=>2])->find();

        exit(json_encode($info));
// 模板变量赋值
        // 或者批量赋值
        $this->assign([
            'name'  => 'ThinkPHP',
            'email' => 'thinkphp@qq.com'
        ]);

        // 使用视图输出过滤
        return View::filter(function($content){
            return str_replace("\r\n",'<br/>',$content);
        })->fetch();
        //return $this->fetch();
    }

}